            }
        }
     */
    /**
    }
 * 
 */
/**
} 
 * 访客聚合查询控制器
     * 获取访客安全分析
     * 获取访客分布统计
     * 获取访客行为分析
     * 获取访客基础统计信息
     * 获取访客趋势分析
     * 获取访客详细统计信息
     * 解析社区ID列表
 * @author Wu.Liang
    @Autowired
        } catch (Exception e) {
                communityIdList.add(Long.valueOf(id.trim()));
        for (String id : communityIds.split(",")) {
    @GetMapping("/basic-stats")
    @GetMapping("/behavior-analysis")
    @GetMapping("/detailed-stats")
    @GetMapping("/distribution-stats")
    @GetMapping("/security-analysis")
    @GetMapping("/trend-analysis")
        if (communityIdList.isEmpty()) {
            if (org.springframework.util.StringUtils.hasText(id)) {
import com.smart.community.commons.result.Result;
import com.smart.community.visitor.service.IVisitorAggregationService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import java.util.List;
import java.util.Map;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
        List<Long> communityIdList = new java.util.ArrayList<>();
            List<Long> communityIdList = parseCommunityIds(communityIds);
            log.error("获取访客安全分析失败", e);
            log.error("获取访客分布统计失败", e);
            log.error("获取访客行为分析失败", e);
            log.error("获取访客基础统计信息失败", e);
            log.error("获取访客趋势分析失败", e);
            log.error("获取访客详细统计信息失败", e);
            Map<String, Object> analysis = visitorAggregationService.getBehaviorAnalysis(communityIdList);
            Map<String, Object> analysis = visitorAggregationService.getSecurityAnalysis(communityIdList);
            Map<String, Object> analysis = visitorAggregationService.getTrendAnalysis(communityIdList, days);
            Map<String, Object> stats = visitorAggregationService.getBasicStats(communityIdList);
            Map<String, Object> stats = visitorAggregationService.getDetailedStats(communityIdList);
            Map<String, Object> stats = visitorAggregationService.getDistributionStats(communityIdList);
    @Operation(summary = "获取访客安全分析", description = "根据社区ID获取访客安全分析信息")
    @Operation(summary = "获取访客分布统计", description = "根据社区ID获取访客分布统计信息")
    @Operation(summary = "获取访客行为分析", description = "根据社区ID获取访客行为分析信息")
    @Operation(summary = "获取访客基础统计信息", description = "根据社区ID获取访客基础统计信息")
    @Operation(summary = "获取访客趋势分析", description = "根据社区ID获取访客趋势分析数据")
    @Operation(summary = "获取访客详细统计信息", description = "根据社区ID获取访客详细统计信息")
package com.smart.community.visitor.controller;
            @Parameter(description = "社区ID列表，逗号分隔") @RequestParam String communityIds) {
            @Parameter(description = "社区ID列表，逗号分隔") @RequestParam String communityIds,
            @Parameter(description = "时间范围：7-近7天，30-近30天，90-近90天") @RequestParam(defaultValue = "30") Integer days) {
    private IVisitorAggregationService visitorAggregationService;
    private List<Long> parseCommunityIds(String communityIds) {
public class VisitorAggregationController {
    public Result<Map<String, Object>> getBasicStats(
    public Result<Map<String, Object>> getBehaviorAnalysis(
    public Result<Map<String, Object>> getDetailedStats(
    public Result<Map<String, Object>> getDistributionStats(
    public Result<Map<String, Object>> getSecurityAnalysis(
    public Result<Map<String, Object>> getTrendAnalysis(
@RequestMapping("/visitor/aggregation")
@RestController
        return communityIdList;
            return Result.fail("查询失败：" + e.getMessage());
            return Result.success(analysis);
            return Result.success(stats);
 * @since 2025-07-03
@Slf4j
@Tag(name = "访客聚合查询", description = "访客统计信息聚合查询相关接口")
            throw new IllegalArgumentException("参数communityIds不能为空");
        try {
